<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ taglib prefix="s" uri="/struts-tags" %>
<head>
	<title>Insert title here</title>
	<%@ include file="inc/jsCss.jsp" %>
	<script type="text/javascript">
	$(document).ready(function(){
		$("#frm").bind("submit", function(){
			var frm = this;
			Demo.sayHello($("input").val(), function(str){
				if(!!str){
					alert(str);
					frm.submit();
				}
			});
			return false;
		});
	});
	</script>
</head>
<body>
<s:text name="userName"></s:text>
<form action="TestA.do" method="post" id="frm">
<label>name:<input type="text" name="username" /></label>
<label>Pass:<input type="password" name="password" /></label>
<input type="submit" />
</form>
</body>
</html>